﻿// Decompiled with JetBrains decompiler
// Type: TaleWorlds.CampaignSystem.Party.PartyComponents.WarPartyComponent
// Assembly: TaleWorlds.CampaignSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E85F8C15-4DF6-4E9C-A58A-29177E40D07A
// Assembly location: D:\steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client\TaleWorlds.CampaignSystem.dll

using System.Collections.Generic;

#nullable disable
namespace TaleWorlds.CampaignSystem.Party.PartyComponents
{
  public abstract class WarPartyComponent : PartyComponent
  {
    protected override void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
    {
      base.AutoGeneratedInstanceCollectObjects(collectedObjects);
    }

    public Clan Clan => this.Party.MobileParty.ActualClan;

    protected override void OnInitialize() => this.Clan.OnWarPartyAdded(this);

    protected override void OnFinalize() => this.Clan.OnWarPartyRemoved(this);

    internal void OnClanChange(Clan oldClan, Clan newClan)
    {
      oldClan.OnWarPartyRemoved(this);
      newClan.OnWarPartyAdded(this);
    }
  }
}
